﻿using System.Linq.Expressions;

namespace MiniFox.Infrastructure
{
    /// <summary>
    /// 
    /// </summary>
    public interface IQueryObject
    {
        /// <summary>
        /// 
        /// </summary>
        bool SortDesc { get; set; }
        /// <summary>
        /// 
        /// </summary>
        string SortField { get; set; }
        /// <summary>
        /// 
        /// </summary>
        Dictionary<string, bool> SortFields { get; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IDictionary<string, object> GetParametersDictionary();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ignoreTarget"></param>
        /// <returns></returns>
        IDictionary<string, object> GetParametersDictionary(bool ignoreTarget);
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        string GetQueryExpression();
        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <returns></returns>
        Expression<Func<TEntity, bool>> GetQueryExpression<TEntity>();
    }
}